package com.demo3;

import java.util.StringJoiner;

public class StringJoinerDemo1 {
    public static void main(String[] args) {
        //1.创建对象
        StringJoiner joiner = new StringJoiner("---");
        //2.添加元素
        joiner.add("aaa").add("bbb").add("ccc");
        //3.打印
        System.out.println(joiner);
    }
}
